<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>
    <%--
        <%= JSP表达式 %>
    --%>
    <c:out value="${pageContext.servletContext.contextPath}"></c:out>

    <%
        // JSP脚本
        request.setAttribute("user", "张三");
    %>

    <c:if test="${ ! empty user}">
        <c:out value="${pageContext.servletContext.contextPath}"></c:out>
    </c:if>
</h1>

</body>
</html>
